Optimal. Leaf size=37 \[ 2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \cos (x)}}{\sqrt {a}}\right )-2 \sqrt {a+b \cos (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {2721, 50, 63, 207} \[ 2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \cos (x)}}{\sqrt {a}}\right )-2 \sqrt {a+b \cos (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 50
Rule 63
Rule 207
Rule 2721
Rubi steps
\begin {align*} \int \sqrt {a+b \cos (x)} \tan (x) \, dx &=-\operatorname {Subst}\left (\int \frac {\sqrt {a+x}}{x} \, dx,x,b \cos (x)\right )\\ &=-2 \sqrt {a+b \cos (x)}-a \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a+x}} \, dx,x,b \cos (x)\right )\\ &=-2 \sqrt {a+b \cos (x)}-(2 a) \operatorname {Subst}\left (\int \frac {1}{-a+x^2} \, dx,x,\sqrt {a+b \cos (x)}\right )\\ &=2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \cos (x)}}{\sqrt {a}}\right )-2 \sqrt {a+b \cos (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 37, normalized size = 1.00 \[ 2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \cos (x)}}{\sqrt {a}}\right )-2 \sqrt {a+b \cos (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.34, size = 109, normalized size = 2.95 \[ \left [\frac {1}{2} \, \sqrt {a} \log \left (-\frac {b^{2} \cos \relax (x)^{2} + 8 \, a b \cos \relax (x) + 4 \, {\left (b \cos \relax (x) + 2 \, a\right )} \sqrt {b \cos \relax (x) + a} \sqrt {a} + 8 \, a^{2}}{\cos \relax (x)^{2}}\right ) - 2 \, \sqrt {b \cos \relax (x) + a}, -\sqrt {-a} \arctan \left (\frac {2 \, \sqrt {b \cos \relax (x) + a} \sqrt {-a}}{b \cos \relax (x) + 2 \, a}\right ) - 2 \, \sqrt {b \cos \relax (x) + a}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.38, size = 34, normalized size = 0.92 \[ -\frac {2 \, a \arctan \left (\frac {\sqrt {b \cos \relax (x) + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} - 2 \, \sqrt {b \cos \relax (x) + a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 30, normalized size = 0.81 \[ 2 \arctanh \left (\frac {\sqrt {a +b \cos \relax (x )}}{\sqrt {a}}\right ) \sqrt {a}-2 \sqrt {a +b \cos \relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.67, size = 46, normalized size = 1.24 \[ -\sqrt {a} \log \left (\frac {\sqrt {b \cos \relax (x) + a} - \sqrt {a}}{\sqrt {b \cos \relax (x) + a} + \sqrt {a}}\right ) - 2 \, \sqrt {b \cos \relax (x) + a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.03 \[ \int \mathrm {tan}\relax (x)\,\sqrt {a+b\,\cos \relax (x)} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a + b \cos {\relax (x )}} \tan {\relax (x )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________